<template>
	<view>
		<view class="bg-white radius-20 padding-sm goosListBox margin-bottom-sm " v-for="(item,index) in goodsList" :key="index">
			
			<view class="flex"  @tap="$jumpPage"
										:data-jumpUrl="'/pages/shopping/desc?id='+item.id"
										data-jumpType="2">
				<view class="goodImge relative">
					<!-- <view class="" v-if="item.tagTitles.length>0">
						<view v-for="(tags,num) in item.tagTitles" :key="num">
							<view v-if="num==0" class="mjImge"><image src="/static/img/temp/mj.png" mode="widthFix"></image></view>
							<view class="rxLabel base-font-22 text-center radius-8" :class="num%2==1?'xx':'rx'" v-else>{{tags}}</view>
						</view>
					</view> -->
					<image :src="item.image" mode="scaleToFill" style="vertical-align:middle;" class="radius-10"></image>
					</view>
				<view style="width:380rpx;" class="padding-left-sm">
					<view style="height:136rpx;">
						<view class="ellipsis2 base-font-26 text-bold text-000">{{item.title}}</view>
						<view class="base-font-20 text-999 margin-top-sm">已售<text class="text-red">{{item.buyNum}}</text></view>
					</view>
					<view class="flex align-center base-font-20 flex-wrap">
						<view class="hdlabel radius-6" :class="num==0?'zk':''"v-for="(tags,num) in item.tagTitles" :key="num">{{tags}}</view>
					</view>
					<view class="flex align-center margin-top-sm">
						<view>
							<view class="text-red ellipsis" style="width:160rpx;">
								<text class="base-font-20">￥</text>
								<text class="base-font-38 text-bold">{{item.prePrice}}</text>
								<text class="bsae-font-28 text-999 margin-left-xs" style="text-decoration: line-through;">￥{{item.origPrice}}</text>
							</view>
						</view>
						<view  class="text-center bg-yellow round base-font-24 base-h-65 text-white" style="width:200rpx;">立即购买</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import api from '@/utils/api.js';
	export default{
		props:{
			goodsList:{
				type:Array
			}
		},
		data(){
			return{
			}
		},
		mounted() {
		  this.curTab = this.tab;
		 
		}
	}
</script>

<style>
	page{}
	.goodImge,.goodImge image{width:280rpx;height:260rpx;} 
	.goosListBox .hdlabel{padding:7rpx 15rpx;border:1rpx solid #c5c5c5; margin-right:10rpx;}
	.goosListBox .hdlabel.zk{background:#ff4444;color:#FFFFFF;border-color:#ff4444;}
	.mjImge{position:absolute;left:0;top:0;z-index:20;}
	.mjImge,.mjImge image{width:80rpx;height: 109rpx;}
	.rxLabel{width:100rpx;height:50rpx;color:#FFFFFF;line-height:50rpx;position:absolute;left:0;bottom:0;z-index:20;}
	.rxLabel.rx{background: #fb0000;}
	.rxLabel.xx{background: #5fcc56;}
</style>